package ai.plantdata.Structural.mode.ProxyPattern.interfaces.impl;

import ai.plantdata.Structural.mode.ProxyPattern.interfaces.Image;

/**
 * @Author: WangHui
 * @Date: 2020/12/21 17:14
 * @Description:
 */
public class RealImage implements Image {
    private String fileName;

    public RealImage(String fileName) {
        this.fileName = fileName;
        loadFromDisk(fileName);
    }

    @Override
    public void display() {
        System.out.println("Displayinf "+fileName);
    }

    private void loadFromDisk(String fileName){
        System.out.println("Loading "+fileName);
    }
}
